Skip to content

fix: ignore nested dependency trees in watcher - #4

Open
kvoon3 wants to merge 1 commit into
earendil-works:mainfrom
kvoon3:fix/nested-watch-directories
Open

fix: ignore nested dependency trees in watcher#4
kvoon3 wants to merge 1 commit into
earendil-works:mainfrom
kvoon3:fix/nested-watch-directories

Conversation

@kvoon3

@kvoon3 kvoon3 commented Jul 25, 2026

Copy link
Copy Markdown

Fixes #5

Summary

Prevent /diff-review from crashing Pi when reviewing repositories that contain nested node_modules or .git
directories.

Problem

The file watcher only ignored .git and node_modules when they were located directly under the repository root.

In repositories containing nested dependency trees or embedded Git repositories, Chokidar could create too many file
watchers and eventually emit:

 EMFILE: too many open files, watch

Because the watcher error was unhandled, the error terminated Pi.

Changes

  • Ignore .git and node_modules directories at any depth.
  • Handle watcher errors so they do not become uncaught exceptions.
  • Add regression tests for nested ignored directories.

@melihmucuk

Copy link
Copy Markdown

+1

@kvoon3
kvoon3 force-pushed the fix/nested-watch-directories branch from dbf969d to 4ec8c18 Compare July 29, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too many open files

2 participants